{include file="common/_meta" /}
<title>评论管理</title>
<meta name="keywords" content="李志立，lizhilimaster@163.com">
<meta name="description" content="李志立，lizhilimaster@163.com">
</head>
<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 评论中心 <span class="c-gray en">&gt;</span>
		评论管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"
		 title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="page-container">
		<div class="text-c">
			<form action="" method="post">
				<input type="text" class="input-text" style="width:250px" placeholder="搜索内容"  value="{$key}" name="key">
				<button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜评论</button>
			</form>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l">
			</span> <span class="r">共有数据：<strong>{$count1}</strong> 条</span> </div>
		<div class="mt-20">
			<table class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="60">ID</th>
						<th width="100">标题</th>
						<th width="60">姓名</th>
						<th width="60">手机</th>
						<th width="260">内容</th>
						<th width="130">时间</th>
						<th width="70">状态</th>
						<th width="80">操作</th>
					</tr>
				</thead>
				<tbody>
					{volist name="comment" id="vo"}
					<tr class="text-c">
						<td>{$vo.id}</td>
						<td>
							{$vo.title}
						</td>
						<td>{$vo.name}</td>
						<td>{$vo.phone}</td>
						<td>{$vo.neirong}</td>
						<td>{$vo.create_time|date='Y-m-d H:i:s'}</td>
						<td class="td-status">
							{switch name="vo.isopen" }
							{case value="1"}<span class="label label-success radius">已查看</span>{/case}
							{case value="0"}<span class="label label-default radius">未查看</span>{/case}
							{/switch}
						</td>
						<td class="td-manage">

							<a title="编辑" href="javascript:;" onclick="member_edit('编辑','{:url(\'message/edit\',[\'id\'=>$vo.id])}','4','','510')"
							 class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>

							<a title="删除" href="javascript:;" onclick="member_del(this,{$vo.id})" class="ml-5" style="text-decoration:none"><i
								 class="Hui-iconfont">&#xe6e2;</i></a></td>
					</tr>
					{/volist}
				</tbody>
			</table>
			{$comment|raw}
		</div>
	</div>
	{include file="common/_footer" /}
	<script type="text/javascript">
		/*评论-编辑*/
		function member_edit(title, url, id, w, h) {
			layer_show(title, url, w, h);
		}
		/*管理员-删除*/
		function member_del(obj, id) {
			layer.confirm('确认要删除吗？', function(index) {
				$.post(
					"{:url('message/ajax')}", {
						id: id,
						type: 'member_del',
					},
					function(result) {
						if (result[0] == 1) {
							$(obj).parents("tr").remove();
							layer.msg('已删除!', {
								icon: 1,
								time: 1000
							});
							if (result[1] == 0) {
								parent.document.getElementById("lizhili_liu").innerHTML = "留";
							} else {
								parent.document.getElementById("lizhili_liu").innerHTML = "留" + result[1];
							}
						} else {
							layer.msg('删除失败!', {
								icon: 5,
								time: 1000
							});
						}


					});
			});
		}
	</script>
</body>
</html>
